#include "../maindef.h"
#include "../mainctrl.h"
#include "CBattleData.h"

void CBattleRoleData::DumpRoleData(CPlayerAttr& stBattleAttr,
        CPlayerAttr& stTurnMainAttr, CPlayerAttr& stTurnMinorAttr,
        bool bIsTurnBegin)
{
    CT_BATTLE(("%-18s = %d", "当前血量", _iHP));
    CT_BATTLE(("%-18s = %d", "当前怒气", _iAnger));
    CT_BATTLE(("%-18s = %d", "当前勇气", _iCourage));
    if (!bIsTurnBegin)
    {
        CT_BATTLE(("%-18s = %d", "最大血量", _iHPMax));
        CT_BATTLE(("%-18s = %d", "最大勇气", _iCourageMax));
        CT_BATTLE(("%-18s = %d", "勇气恢复", _iCourageRecRate));
        CT_BATTLE(("%-18s = %d", "攻击方", _bIsLeft));
        CT_BATTLE(("%-18s = %d", "出手顺序", _ucOrder));
        CT_BATTLE(("%-18s = %d", "职业", _ucCareer));
        CT_BATTLE(("%-18s = %d", "等级", _shLevel));
        CT_BATTLE(("%-18s = %d", "初始站位", _iGridPos));

        CT_BATTLE(("%-18s", "开启战斗时面板上的二级属性:"));
        CT_BATTLE(("%-18s = %d", "生命", _stAttr.GetAttr(EXT_ATTR_HP)));
        CT_BATTLE(("%-18s = %d", "物攻", _stAttr.GetAttr(EXT_ATTR_PHY_ATK)));
        CT_BATTLE(("%-18s = %d", "物防", _stAttr.GetAttr(EXT_ATTR_PHY_DEF)));
        CT_BATTLE(("%-18s = %d", "魔攻", _stAttr.GetAttr(EXT_ATTR_MAG_ATK)));
        CT_BATTLE(("%-18s = %d", "魔防", _stAttr.GetAttr(EXT_ATTR_MAG_DEF)));
        CT_BATTLE(("%-18s = %d", "地攻", _stAttr.GetAttr(EXT_ATTR_EARTH_ATK)));
        CT_BATTLE(("%-18s = %d", "风攻", _stAttr.GetAttr(EXT_ATTR_WIND_ATK)));
        CT_BATTLE(("%-18s = %d", "火攻", _stAttr.GetAttr(EXT_ATTR_FIRE_ATK)));
        CT_BATTLE(("%-18s = %d", "水攻", _stAttr.GetAttr(EXT_ATTR_WATER_ATK)));
        CT_BATTLE(("%-18s = %d", "命中", _stAttr.GetAttr(EXT_ATTR_HIT)));
        CT_BATTLE(("%-18s = %d", "闪避", _stAttr.GetAttr(EXT_ATTR_DODGE)));
        CT_BATTLE(("%-18s = %d", "暴击", _stAttr.GetAttr(EXT_ATTR_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "抗暴", _stAttr.GetAttr(EXT_ATTR_ANTI_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "格挡", _stAttr.GetAttr(EXT_ATTR_BLOCK)));
        CT_BATTLE(("%-18s = %d", "破击", _stAttr.GetAttr(EXT_ATTR_ANTI_BLOCK)));
        CT_BATTLE(("%-18s = %d", "出手速度", _stAttr.GetAttr(EXT_ATTR_TURN_ORDRE)));
        CT_BATTLE(("%-18s = %d", "必杀", _stAttr.GetAttr(EXT_ATTR_CRIT)));
        CT_BATTLE(("%-18s = %d", "免伤", _stAttr.GetAttr(EXT_ATTR_IMMUNE_INJURY)));
        CT_BATTLE(("%-18s = %d", "反伤", _stAttr.GetAttr(EXT_ATTR_REACT_INJURY)));
        CT_BATTLE(("%-18s = %d", "穿透", _stAttr.GetAttr(EXT_ATTR_PENETRATE)));
        CT_BATTLE(("%-18s = %d", "痊愈", _stAttr.GetAttr(EXT_ATTR_TREATMENT)));
        CT_BATTLE(("%-18s = %d", "反击", _stAttr.GetAttr(EXT_ATTR_FIGHT_BACK)));

        CT_BATTLE(("%-18s", "开启战斗时战前触发的二级属性:"));
        CT_BATTLE(("%-18s = %d", "生命", stBattleAttr.GetAttr(EXT_ATTR_HP)));
        CT_BATTLE(("%-18s = %d", "物攻", stBattleAttr.GetAttr(EXT_ATTR_PHY_ATK)));
        CT_BATTLE(("%-18s = %d", "物防", stBattleAttr.GetAttr(EXT_ATTR_PHY_DEF)));
        CT_BATTLE(("%-18s = %d", "魔攻", stBattleAttr.GetAttr(EXT_ATTR_MAG_ATK)));
        CT_BATTLE(("%-18s = %d", "魔防", stBattleAttr.GetAttr(EXT_ATTR_MAG_DEF)));
        CT_BATTLE(("%-18s = %d", "地攻", stBattleAttr.GetAttr(EXT_ATTR_EARTH_ATK)));
        CT_BATTLE(("%-18s = %d", "风攻", stBattleAttr.GetAttr(EXT_ATTR_WIND_ATK)));
        CT_BATTLE(("%-18s = %d", "火攻", stBattleAttr.GetAttr(EXT_ATTR_FIRE_ATK)));
        CT_BATTLE(("%-18s = %d", "水攻", stBattleAttr.GetAttr(EXT_ATTR_WATER_ATK)));
        CT_BATTLE(("%-18s = %d", "命中", stBattleAttr.GetAttr(EXT_ATTR_HIT)));
        CT_BATTLE(("%-18s = %d", "闪避", stBattleAttr.GetAttr(EXT_ATTR_DODGE)));
        CT_BATTLE(("%-18s = %d", "暴击", stBattleAttr.GetAttr(EXT_ATTR_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "抗暴", stBattleAttr.GetAttr(EXT_ATTR_ANTI_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "格挡", stBattleAttr.GetAttr(EXT_ATTR_BLOCK)));
        CT_BATTLE(("%-18s = %d", "破击", stBattleAttr.GetAttr(EXT_ATTR_ANTI_BLOCK)));
        CT_BATTLE(("%-18s = %d", "出手速度", stBattleAttr.GetAttr(EXT_ATTR_TURN_ORDRE)));
        CT_BATTLE(("%-18s = %d", "必杀", stBattleAttr.GetAttr(EXT_ATTR_CRIT)));
        CT_BATTLE(("%-18s = %d", "免伤", stBattleAttr.GetAttr(EXT_ATTR_IMMUNE_INJURY)));
        CT_BATTLE(("%-18s = %d", "反伤", stBattleAttr.GetAttr(EXT_ATTR_REACT_INJURY)));
        CT_BATTLE(("%-18s = %d", "穿透", stBattleAttr.GetAttr(EXT_ATTR_PENETRATE)));
        CT_BATTLE(("%-18s = %d", "痊愈", stBattleAttr.GetAttr(EXT_ATTR_TREATMENT)));
        CT_BATTLE(("%-18s = %d", "反击", stBattleAttr.GetAttr(EXT_ATTR_FIGHT_BACK)));

        CT_BATTLE(("%-18s", "战斗状态基本信息:"));
        CMainCtrl::m_pstMain->m_stStatusMgr.DumpStatusList(_stStatusList);

        if (_stNormalSkill.GetID() > 0)
        {
            CT_BATTLE(("%-18s", "普通技能基本信息:"));
            _stNormalSkill.DumpSkillInfo();
        }
        if (_stMagicSkill.GetID() > 0)
        {
            CT_BATTLE(("%-18s", "幻化技能基本信息:"));
            _stMagicSkill.DumpSkillInfo();
        }
    }
    else
    {
        CT_BATTLE(("%-18s", "预处理主技能功能加成的二级属性:"));
        CT_BATTLE(("%-18s = %d", "生命", stTurnMainAttr.GetAttr(EXT_ATTR_HP)));
        CT_BATTLE(("%-18s = %d", "物攻", stTurnMainAttr.GetAttr(EXT_ATTR_PHY_ATK)));
        CT_BATTLE(("%-18s = %d", "物防", stTurnMainAttr.GetAttr(EXT_ATTR_PHY_DEF)));
        CT_BATTLE(("%-18s = %d", "魔攻", stTurnMainAttr.GetAttr(EXT_ATTR_MAG_ATK)));
        CT_BATTLE(("%-18s = %d", "魔防", stTurnMainAttr.GetAttr(EXT_ATTR_MAG_DEF)));
        CT_BATTLE(("%-18s = %d", "地攻", stTurnMainAttr.GetAttr(EXT_ATTR_EARTH_ATK)));
        CT_BATTLE(("%-18s = %d", "风攻", stTurnMainAttr.GetAttr(EXT_ATTR_WIND_ATK)));
        CT_BATTLE(("%-18s = %d", "火攻", stTurnMainAttr.GetAttr(EXT_ATTR_FIRE_ATK)));
        CT_BATTLE(("%-18s = %d", "水攻", stTurnMainAttr.GetAttr(EXT_ATTR_WATER_ATK)));
        CT_BATTLE(("%-18s = %d", "命中", stTurnMainAttr.GetAttr(EXT_ATTR_HIT)));
        CT_BATTLE(("%-18s = %d", "闪避", stTurnMainAttr.GetAttr(EXT_ATTR_DODGE)));
        CT_BATTLE(("%-18s = %d", "暴击", stTurnMainAttr.GetAttr(EXT_ATTR_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "抗暴", stTurnMainAttr.GetAttr(EXT_ATTR_ANTI_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "格挡", stTurnMainAttr.GetAttr(EXT_ATTR_BLOCK)));
        CT_BATTLE(("%-18s = %d", "破击", stTurnMainAttr.GetAttr(EXT_ATTR_ANTI_BLOCK)));
        CT_BATTLE(("%-18s = %d", "出手速度", stTurnMainAttr.GetAttr(EXT_ATTR_TURN_ORDRE)));
        CT_BATTLE(("%-18s = %d", "必杀", stTurnMainAttr.GetAttr(EXT_ATTR_CRIT)));
        CT_BATTLE(("%-18s = %d", "免伤", stTurnMainAttr.GetAttr(EXT_ATTR_IMMUNE_INJURY)));
        CT_BATTLE(("%-18s = %d", "反伤", stTurnMainAttr.GetAttr(EXT_ATTR_REACT_INJURY)));
        CT_BATTLE(("%-18s = %d", "穿透", stTurnMainAttr.GetAttr(EXT_ATTR_PENETRATE)));
        CT_BATTLE(("%-18s = %d", "痊愈", stTurnMainAttr.GetAttr(EXT_ATTR_TREATMENT)));
        CT_BATTLE(("%-18s = %d", "反击", stTurnMainAttr.GetAttr(EXT_ATTR_FIGHT_BACK)));

        CT_BATTLE(("%-18s", "预处理辅技能功能加成的二级属性:"));
        CT_BATTLE(("%-18s = %d", "生命", stTurnMinorAttr.GetAttr(EXT_ATTR_HP)));
        CT_BATTLE(("%-18s = %d", "物攻", stTurnMinorAttr.GetAttr(EXT_ATTR_PHY_ATK)));
        CT_BATTLE(("%-18s = %d", "物防", stTurnMinorAttr.GetAttr(EXT_ATTR_PHY_DEF)));
        CT_BATTLE(("%-18s = %d", "魔攻", stTurnMinorAttr.GetAttr(EXT_ATTR_MAG_ATK)));
        CT_BATTLE(("%-18s = %d", "魔防", stTurnMinorAttr.GetAttr(EXT_ATTR_MAG_DEF)));
        CT_BATTLE(("%-18s = %d", "地攻", stTurnMinorAttr.GetAttr(EXT_ATTR_EARTH_ATK)));
        CT_BATTLE(("%-18s = %d", "风攻", stTurnMinorAttr.GetAttr(EXT_ATTR_WIND_ATK)));
        CT_BATTLE(("%-18s = %d", "火攻", stTurnMinorAttr.GetAttr(EXT_ATTR_FIRE_ATK)));
        CT_BATTLE(("%-18s = %d", "水攻", stTurnMinorAttr.GetAttr(EXT_ATTR_WATER_ATK)));
        CT_BATTLE(("%-18s = %d", "命中", stTurnMinorAttr.GetAttr(EXT_ATTR_HIT)));
        CT_BATTLE(("%-18s = %d", "闪避", stTurnMinorAttr.GetAttr(EXT_ATTR_DODGE)));
        CT_BATTLE(("%-18s = %d", "暴击", stTurnMinorAttr.GetAttr(EXT_ATTR_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "抗暴", stTurnMinorAttr.GetAttr(EXT_ATTR_ANTI_DOUBLE)));
        CT_BATTLE(("%-18s = %d", "格挡", stTurnMinorAttr.GetAttr(EXT_ATTR_BLOCK)));
        CT_BATTLE(("%-18s = %d", "破击", stTurnMinorAttr.GetAttr(EXT_ATTR_ANTI_BLOCK)));
        CT_BATTLE(("%-18s = %d", "出手速度", stTurnMinorAttr.GetAttr(EXT_ATTR_TURN_ORDRE)));
        CT_BATTLE(("%-18s = %d", "必杀", stTurnMinorAttr.GetAttr(EXT_ATTR_CRIT)));
        CT_BATTLE(("%-18s = %d", "免伤", stTurnMinorAttr.GetAttr(EXT_ATTR_IMMUNE_INJURY)));
        CT_BATTLE(("%-18s = %d", "反伤", stTurnMinorAttr.GetAttr(EXT_ATTR_REACT_INJURY)));
        CT_BATTLE(("%-18s = %d", "穿透", stTurnMinorAttr.GetAttr(EXT_ATTR_PENETRATE)));
        CT_BATTLE(("%-18s = %d", "痊愈", stTurnMinorAttr.GetAttr(EXT_ATTR_TREATMENT)));
        CT_BATTLE(("%-18s = %d", "反击", stTurnMinorAttr.GetAttr(EXT_ATTR_FIGHT_BACK)));
    }
}
